package com.test.session.demo;

import cn.hutool.core.util.IdUtil;
import cn.hutool.crypto.SecureUtil;

import java.util.HashMap;
import java.util.Map;

public class test {
    public static String a(){
        Map names = new HashMap();
        names.put("content", "wanghui1");
        names.put("res", true);
        System.out.println("这是String格式："+names.toString());
        return names.toString();
    }
    public static Map b(){
        String s = a();
        Map m = new HashMap();
        s = s.substring(1,s.length()-1);//去掉括号问
        String[] kvs = s.split(",");
        //拆成key 和value 的组合
        for(String kv:kvs){
            m.put(kv.substring(0,s.indexOf('=')),kv.substring(s.indexOf('=')+1));
            //拆成key 和value 分别答放好
        }
        System.out.println("这是Map格式："+m);
        return m;
    }

    public static void main(String[] args) {
        System.out.println(IdUtil.simpleUUID());
    }
}

